const common = require('./webpack.common')
const merge = require('webpack-merge')
const webpack = require('webpack')

// merge内部会自动处理合并的逻辑
module.exports = merge(common, {
  mode: 'development',
  devServer: {
    hot: true,
    open: true,
    port: 8000,
    host: 'localhost',
    contentBase: 'public'
  },
  devtool: 'cheap-eval-module-source-map',
  plugins: [
    new webpack.HotModuleReplacementPlugin()
  ]
})